<template>
	<view class="uni_box home">
		<!-- <navbar title=''>
		</navbar> -->
		<view class="content">
			<image class="img_bjtuan" src="/static/img/img_bjtuan.png"></image>
			<view class="qianview">
				<view class="jione">
					<image class="icon_back" src="/static/img/icon_back.png" @click="getfan"></image>
					<text class="htit">我的团队</text>
				</view>
				<view class="tone">
					<image class="tnav" src="/static/img/tnav.png"></image>
					<view class="toneview">
						<view class="tbiao">
							项多汇邀请好友政策
						</view>
						<!-- <view class="futxt">
							<u-parse :html="ftxtcont.content"></u-parse>
						</view> -->
						<view class="tming" v-for="(item,index) in info" :key="index">
							<text class="mname">{{ index+1 }}</text>
							<view class="mright">
								<text>{{item[0]}}</text>
								<text>{{item[1]}}</text>
							</view>
						</view>
						<!-- <view class="tming">
							<text class="mname">1</text>
							<view class="mright">
								<text>一级好友首次绑定支付宝奖励0.5元</text>
								<text>二级好友首次绑定支付宝奖励0.2元</text>
							</view>
						</view>
						<view class="tming">
							<text class="mname">2</text>
							<view class="mright">
								<text>一级好友首次提现奖励1.5元</text>
								<text>二级好友首次提现奖励0.5元</text>
							</view>
						</view>
						<view class="tming">
							<text class="mname">3</text>
							<view class="mright">
								<text>【活跃奖】</text>
								<text>一级好友每天首次打开App奖励0.3元</text>
								<text>二级好友每天首次打开App奖励0.1元</text>
							</view>
						</view>
						<view class="tming">
							<text class="mname">4</text>
							<view class="mright">
								<text>一级注册好友奖励1元</text>
								<text>一级注册好友有效奖励1元</text>
							</view>
						</view> -->
					</view>
				</view>
				<view class="ttwo" @click="getyao">
					<image class="btn_an" src="/static/img/btn_an.png"></image>
					<view class="yaoview">邀请好友</view>
				</view>
				<view class="tthree">
					<view class="youlist">
						<!-- <view class="youitem" v-for="(item,index) in teaminfo" :key="index">
							<view class="youone">
								<image class="oneicon" :src="item.image?item.image:'/static/img/one.png'"></image>
								<text class="yitit">{{item.title}}</text>
							</view>
							<text class="yname">今日活跃：<text class="ynum">{{ item.nums }}</text>人</text>
							<text class="yname">活跃奖励：<text class="ynum">{{ item.money }}</text>元</text>
						</view> -->
						<!-- <view class="youitem ml">
							<view class="youone">
								<image class="oneicon" src="/static/img/two.png"></image>
								<text class="yitit">二级好友活跃</text>
							</view>
							<text class="yname">今日活跃：<text class="ynum">5</text>人</text>
							<text class="yname">活跃奖励：<text class="ynum">1.50</text>元</text>
						</view> -->
					</view>
					<!-- <view class="jiviewbot">
						<view class="jiitem" v-for="(item,index) in teaminfo" :key="index" @click="getji(index+1)">
							<image class="img_yj" src="/static/img/img_yj.png"></image>
							<text class="yjname">{{item.title2}}</text>
							<text class="yjnum">{{item.count}}人</text>
						</view>
					</view> -->
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				teaminfo:[],
				ftxtcont:{},
				info:{}
			}
		},
		onLoad() {
			this.getinit();
			this.ftxt();//富文本
			this.fgetMyTeamContent();//获取上面信息
		},
		onShow() {
		},
		methods: {
			async ftxt(){
				let res = await this.$u.api.getContent({
					code:'my-team'
				});
				this.ftxtcont = res
			},
			async getinit(){
				let res = await this.$u.api.getMyTeamData({
				});
				this.teaminfo = res
			},
			async fgetMyTeamContent(){
				let res = await this.$u.api.getMyTeamContent({
				});
				this.info = res
			},
			getji(e){
				console.log("+++")
				this.navrouter("/pages_subject/twoPage/MyTeamList?type="+e);
			},
			getfan(){
				uni.navigateBack()
			},
			getyao(){
				this.navrouter('/pages/TPage/YaoPage')
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #fff;
	}
	.content{
		min-height: 100vh;
		background-color: #f5f5f5;
		position: relative;
		.img_bjtuan{
			position: absolute;
			width: 100%;
			height: 100%;
		}
		.qianview{
			position: relative;
			.jione{
				position: relative;
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: center;
				padding: 30rpx 0 0 30rpx;
				// #ifdef APP-PLUS
				padding-top: calc(var(--status-bar-height) + 30rpx);
				// #endif
			}
			.icon_back{
				width: 35rpx;
				height: 35rpx;
				position: absolute;
				left: 30rpx;

			}
			.htit{
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color: #FFFFFF;
			}
			.jiview{
				margin-left: auto;
				width: 126rpx;
				height: 60rpx;
				background: rgba(0,0,0,0.2);
				border-radius: 30rpx 0rpx 0rpx 30rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				.jilu{
					width: 44rpx;
					height: 44rpx;
					margin-right: 4rpx;
				}
				.jitit{
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #FFFFFF;
				}
			}
		}
		.tone{
			margin: 45rpx;
			position: relative;
			// height: 690rpx;
			height: 420px;
			// padding: 0 0 0 30rpx;
			.tnav{
				position: absolute;
				width: 100%;
				height: 100%;

			}
			.toneview{
				position: relative;
				width: 100%;
				height: 100%;
				display: flex;
				flex-direction: column;

			}
			.tbiao{
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #FBE062;
				display: flex;
				align-items: center;
				justify-content: center;
				height: 43px;
				margin-bottom: 50rpx;

			}
			.futxt{
				padding: 30rpx;
			}
			.tming{
				// margin-top: 60rpx;
				margin-bottom: 20rpx;
				display: flex;
				flex-direction: row;
				align-items: center;
				.mname{
					font-family: Source Han Sans CN;
					font-weight: bold;
					font-size: 60rpx;
					color: #F52517;
					width: 18%;
					display: flex;
					align-items: center;
					justify-content: center;
				}
				.mright{
					flex: 1;
					padding: 30rpx 30rpx;
					background: #F2EDDF;
					border-radius: 16rpx;
					margin-right: 40rpx;
					text{
						display: block;
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 26rpx;
						color: #F52517;
						display: block;
						margin-bottom: 4rpx;
					}
					text:last-child{
						margin-bottom: 0;
					}
				}
			}
		}
		.ttwo{
			position: relative;
			margin: 100rpx 60rpx 30rpx;
			height: 116rpx;
			.btn_an{
				position: absolute;
				width: 100%;
				height: 100%;
			}
			.yaoview{
				position: relative;
				width: 100%;
				height: 100%;
				display: flex;
				align-items: center;
				justify-content: center;
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 32rpx;
				color: #6C420C;
			}
		}

		.tthree{
			padding: 0 30rpx;
			display: flex;
			flex-direction: column;
			.youlist{
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				.youitem{
					width: 48%;
					padding: 20rpx 30rpx;
					background: #FFFFFF;
					border-radius: 20rpx;
					display: flex;
					flex-direction: column;
					.youone{
						display: flex;
						flex-direction: row;
						align-items: center;
						.oneicon{
							width: 32rpx;
							height: 32rpx;
							margin-right: 8rpx;
						}
						.yitit{
							font-family: PingFang SC;
							font-weight: bold;
							font-size: 28rpx;
							color: #000000;
						}
					}
					.yname{
						display: block;
						font-family: PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #666666;
						margin-top: 10rpx;
					}
					.ynum{
						color: #F54320;
						display: inline-block;
						margin: 0 4rpx;
						font-size: 32rpx;
					}
				}
				.ml{
					margin-left: auto;
				}
			}
			.jiviewbot{
				display: flex;
				flex-direction: row;
				padding-bottom: 40rpx;
				margin-top: 50rpx;
				align-items: center;
				.jiitem{
					width: 50%;
					display: flex;
					align-items: center;
					justify-content: center;
					flex-direction: column;
					.img_yj{
						width: 110rpx;
						height: 110rpx;
						margin-bottom: 9rpx;
					}
					.yjname{
						font-family: PingFang SC;
						font-weight: bold;
						font-size: 24rpx;
						color: #FFFFFF;
					}
					.yjnum{
						font-weight: bold;
						font-size: 36rpx;
						color: #FFFFFF;
					}
				}
				.shu{
					display: inline-block;
					width: 2rpx;
					height: 50rpx;
					background: #EEEEEE;
					opacity: 0.5;
				}
			}
		}
	}
	
</style>
